home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
vdl020d.zip
/
VNET.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
11KB
|
402 lines
{
══════════════════════════════════════════════════════════════════════════════
Visionix Network Functions Unit (VNET)
Copyright 1991,92,93 Visionix
ALL RIGHTS RESERVED
──────────────────────────────────────────────────────────────────────────────
Revision history in reverse chronological order:
Initials Date Comment
──────── ──────── ──────────────────────────────────────────────────────────
lpg 03/16/93 Added Source Documentation
mep 02/11/93 Cleaned up code for beta release
lpg 12/27/92 Started Assemblyizing most of the functions
lpg 12/08/92 Created
──────────────────────────────────────────────────────────────────────────────
Network Functions Summary
-------------------------------------------
INT 21h
Func | Sub | Name | Use
-----+-----+---------------------------+--------------------------------------
44h | 09h | Is Drive Remote | Reports whether drive leter is local or remote (network)
44h | 0Ah | Is File or Device Remote | Reports whether device name is local or remote (network)
5Eh | 00h | Get Machine Name | Reports network name of the workstation
5Eh | 02h | Set Printer Setup | Defines string of chars to be sent with each file to printer
5Eh | 03h | Get Printer Setup | Sent with each file to printer
5Fh | 02h | Get Assign List Entry | Reports IDs and names of drives/devices reassigned to network
5Fh | 03h | Make Network Connection | Redirects local drive/device to a network directory/device
5Fh | 04h | Delete Network Connection | Cancels redirection created with function 5Fh-03h
-----+-----+---------------------------+--------------------------------------
──────────────────────────────────────────────────────────────────────────────
}
Unit VNet;
{
Function NW_IsDriveRemote( Drive : INTEGER;
Var Remote : BOOLEAN ) : WORD;
Function NW_TestHandleRemote( Handle : WORD;
Var Remote : BOOLEAN ) : WORD;
Function NW_SetSharingRetryCnt( RetryCnt : WORD;
PauseTime : WORD ) : WORD;
Function NW_GetStationName( ) : WORD;
Function NW_SetPrinterSetup( ) : WORD;
Function NW_GetPrinterSetup( ) : WORD;
Function NW_GetAssignList( ) : WORD;
Function NW_SetNWRedirection( ) : WORD;
Function NW_CancelNWRedirection( ) : WORD;
}
Function NW_IsDriveRemote( DriveNum : BYTE;
VAR ErrCode : WORD ) : BOOLEAN;
Function NW_IsHandleRemote( Handle : WORD;
Var ErrCode : WORD ) : BOOLEAN;
Procedure NW_SetShareRetryCnt( RetryCnt : WORD;
Pause : WORD;
VAR ErrCode : WORD );
Function NW_GetStationName( VAR NetName : STRING;
VAR Valid : BYTE;
VAR NetBiosNum : BYTE ) : WORD;
Function NW_SetPrinterSetup( ListIndex : WORD;
SetupStr : STRING ) : WORD;
Procedure NW_GetPrinterSetup( ListIndex : WORD;
VAR SetupStr : STRING;
VAR ErrCode : WORD );
(*
VAR SetupString : POINTER; { VAR SetupStr : STRING }
VAR StringLen : WORD;
VAR ErrCode : WORD );
*)
Procedure NW_GetAssignList( ListIndex : WORD;
VAR LocalName : STRING;
VAR NetName : STRING;
VAR Status : BYTE;
VAR Code : BYTE;
VAR ErrCode : WORD );
(*
VAR LocalList : POINTER;
VAR NetList : POINTER;
VAR Status : BYTE;
VAR Code : BYTE;
VAR ErrCode : WORD ) : WORD;
*)
Function NW_SetNWRedirection( DevCode : BYTE;
LocalName : STRING;
NetName : STRING;
Password : STRING ) : WORD;
Function NW_CancelNWRedirection( DevName : STRING ) : WORD;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_IsDriveRemote( DriveNum : BYTE;
VAR ErrCode : WORD ) : BOOLEAN;
[PARAMETERS]
DriveNum Drive Number (0=def,1=A,2=B,..)
ErrCode VAR Returned Error Code (0=Success)
[RETURNS]
Function : Whether Drive is Remote (Network) or Local. (TRUE=Remote)
(VAR : [ErrCode] Error Code
[DESCRIPTION]
Determines whether a device is local or remote (Network).
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_IsHandleRemote( Handle : WORD;
Var ErrCode : WORD ) : BOOLEAN;
[PARAMETERS]
Handle File Handle
ErrCode VAR Returned Error Code (0=Success)
[RETURNS]
Function : Whether handle is Remote (NetWork) or Local. (TRUE=Remote)
(VAR : [ErrCode] Error Code)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure NW_SetShareRetryCnt( RetryCnt : WORD;
Pause : WORD;
VAR ErrCode : WORD );
[PARAMETERS]
RetryCnt Number of Time to Retry on Fail
Pause Wait Time between Retries in Milliseconds
ErrCode VAR Returned Error Code (0=Success)
[RETURNS]
Function : None
(VAR : [ErrCode] Error Code)
[DESCRIPTION]
Set number of times DOS retries a file sharing operation
NOTE: This function may be called ONLY if Networking SW is Installed.
Default is 1 Loop, 3 Retries. Pause depends upon computer clock speed.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_GetStationName( VAR NetName : STRING;
VAR Valid : BYTE;
VAR NetBiosNum : BYTE ) : WORD;
[PARAMETERS]
NetName VAR Returned Network Name
Valid VAR Returned Validity Code
NetBiosNum VAR Returned Network BIOS Number
[RETURNS]
Function : Status Code (0=Success)
(VAR : [NetName] Network Name)
(VAR : [Valid] Validity Code)
(VAR : [NetBiosNum] Network BIOS Number)
[DESCRIPTION]
Reports network name of the workstation.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_SetPrinterSetup( ListIndex : WORD;
SetupStr : STRING ) : WORD;
[PARAMETERS]
ListIndex ?
SetupStr New Printer Setup String
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Defines Printer Setup String to be sent with each file to printer.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure NW_GetPrinterSetup( ListIndex : WORD;
VAR SetupStr : STRING;
VAR ErrCode : WORD );
[PARAMETERS]
ListIndex ?
SetupStr VAR Returned Printer Setup String
ErrCode VAR Returned Error Code (0=Success)
[RETURNS]
Function : None
(VAR : [SetupStr] Printer Setup String)
(VAR : [ErrCode] Error Code)
[DESCRIPTION]
Gets the Printer Setup String which is set with each file to the Printer.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure NW_GetAssignList( ListIndex : WORD;
VAR LocalName : STRING;
VAR NetName : STRING;
VAR Status : BYTE;
VAR Code : BYTE;
VAR ErrCode : WORD );
[PARAMETERS]
ListIndex ?
LocalName VAR Returned Local Name
NetName VAR Returned Network Name
Status VAR Returned Device Availability Status
Code VAR Returned Device Code
ErrCode VAR Returned Error Code (0=Success)
[RETURNS]
Function : None
(VAR : [LocalName] Local Name)
(VAR : [NetName] Network Name)
(VAR : [Status] Device Availability Status)
(VAR : [Code] Device Code)
(VAR : [ErrCode] Error Code)
[DESCRIPTION]
LocalList: Pointer to 128-byte buffer returning with the
Local Name in ASCIIZ format.
NetList : Pointer to 128-byte buffer returning with the
Network Name in ASCIIZ format.
Status : 0 = Available Network Device
1 = Temp Unavailable Device
Code : 03 = Printer Device
04 = Drive Device
Reports Names and IDs drives/devices reassigned to the network.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_SetNWRedirection( DevCode : BYTE;
LocalName : STRING;
NetName : STRING;
Password : STRING ) : WORD;
[PARAMETERS]
DevCode Device Code (03=Printer,04=Drive)
LocalName Local Name
NetName Network Name
Password Network Password
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Redirects local drive/device to a network directory/device.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function NW_CancelNWRedirection( DevName : STRING ) : WORD;
[PARAMETERS]
DevName 16-Character (Max) Source Device Name
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Cancels redirection created with function NW_SetNWRedirection.
[SEE-ALSO]
[EXAMPLE]